package com.chen.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chen.entity.Brands;
import com.chen.service.BrandsService;
import com.chen.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 品牌信息表 前端控制器
 * </p>
 *
 * @author cws
 * @since 2024-11-22
 */
@RestController
@RequestMapping("/mall/brands")
public class BrandsController {

    @Resource
    private BrandsService brandsService;

    @ApiOperation("品牌列表")
    @GetMapping("/list")
    public Result list()
    {
        return Result.success(brandsService.list(new LambdaQueryWrapper<Brands>().orderByAsc(Brands::getSort)));
    }



}

